<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Title</title>
		<style type="text/css">
			div {
				width: 400px;
				height: 400px;
				background-color: pink;
				display: none;
			}
		</style>
	</head>
	<body>
		<input type="button" value="显示">
		<input type="button" value="隐藏">
		<input type="button" value="切换">
		
		<div></div>
		<script src="jquery-1.12.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				
				//淡入: fadeIn   淡出:  fadeOut  切换:  fadeToggle
				$("input").eq(0).click(function(){
					$("div").fadeIn(2000);
				});
				
				$("input").eq(1).click(function(){
					$("div").fadeOut(1000);
				});
				$("input").eq(2).click(function(){
					$("div").fadeToggle();
				})
			});
		</script>
	</body>
</html>